/*
 * Created on 2005-6-8
 *
 */
package com.yl.cap.analyst.user.service;

import jaoso.framework.domain.Account;
import jaoso.framework.exception.GroupExistException;

import java.util.List;

import com.yl.cap.analyst.exceptions.GroupConflictException;
import com.yl.cap.analyst.exceptions.UserExistException;
import com.yl.cap.analyst.user.domain.Group;
import com.yl.cap.analyst.user.domain.User;

/**
 * @author ZhangQi
 *
 */
public interface UserService
{
    /**
     * get all user object
     * @return
     */
    public List getAllUser();
    /**
     * get all group object
     * @return
     */
    public List getAllGroup();
    /**
     * greate a group
     * @param group
     */
    public void createGroup(Group group) throws GroupExistException;
    /**
     * update a group info
     * @param id
     * @param newName
     */
    public void updGroup(Group group) throws GroupExistException;
    /**
     * delete a group
     * @param id
     */
    public void delGroup(String id);
    /**
     * create a user
     * @param user
     */
    public void createUser(User user) throws UserExistException,GroupConflictException;
    /**
     * del some user object
     * @param ids
     */
    public void delUser(String ids[]);
    /**
     * get a account object by id
     * @param id
     * @return
     */
    public Account getUserById(String id);
    /**
     * del some group
     * @param ids
     */
    public void delGroups(String[] ids) throws Exception;
    /**
     * get a group by id
     * @param id
     * @return
     */
    public Group getGroupById(String id);
    
    public void updAccount(Account a);
    
}
